﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Media;
using WinSPen.Settings;

namespace WinSPen.Objects
{
    public class WSPStroke : WSPObject
    {
        public WSPStroke(Layer layer) : base(layer)
        {
            
        }

        private Color _strokeColor;

        /// <summary>
        /// 이 Stroke의 색상
        /// </summary>
        public Color StrokeColor
        {
            get
            {
                if (this._strokeColor == null)
                {
                    this._strokeColor = Colors.Black;
                }
                return this._strokeColor;
            }
            set
            {
                this._strokeColor = value;
            }
        }

        private double _weight;

        /// <summary>
        /// 이 Stroke의 두께
        /// </summary>
        public double Weight
        {
            get { return this._weight; }
            set { this._weight = value; }
        }

        private double _pressure;

        /// <summary>
        /// 이 Stroke의 압력(PC에선 사용되지 않음. Tab에서 전달받는 Stroke 전용)
        /// </summary>
        public double Pressure
        {
            get { return this._pressure; }
            set { this._pressure = value; }
        }

        private PenType _strokeType;

        /// <summary>
        /// 이 Strokr의 종류(Pen, Pencil, Brush, Marker)
        /// </summary>
        public PenType StrokeType
        {
            get { return this._strokeType; }
            set { this._strokeType = value; }
        }

        private List<WSPPoint> _pointList;

        /// <summary>
        /// 이 Stroke 안에 포함된 point의 list
        /// </summary>
        public List<WSPPoint> PointList
        {
            get
            {
                if (_pointList == null)
                {
                    _pointList = new List<WSPPoint>();
                }
                return _pointList;
            }
        }
    }
}
